package com.zxn.kotlin.method

/**
 * 高阶函数的使用2
 */
class FunctionTest {
}

fun onIntent(intent: String,blcok:(Int) -> Unit) {
    val length = intent.length
    blcok(length)
}

fun onParseIntent(userId: Int) {
    println("userId1:$userId")
}

fun onGetIntent(userId: Int) {
    println("userId2:$userId")
}

fun main() {
    println("main")
    val intent = "593066063"
    onIntent(intent,::onParseIntent)

    onIntent(intent,::onGetIntent)
}